package com.rslai.base.tool.servertest.config;

import com.rslai.base.tool.servertest.annotation.ConfigElement;
import com.rslai.base.tool.servertest.annotation.Property;
import com.rslai.base.tool.servertest.command.ExamplesCommand;
import com.rslai.base.tool.servertest.command.StepCommand;

import java.io.IOException;

@ConfigElement(defaultProperty = "body")
public class ExamplesConfig extends StepConfig {
    public static final String BODY_TAG_NAME = "body";

    @Property
    private String body;

    public StepCommand createCommand() {
        try {
            return new ExamplesCommand(this.body);
        } catch (IOException e) {
        }
        return null;
    }
}
